home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 95
/
MOBICLIC 95.ISO
/
mac
/
MWB_DATA
/
TCH095
/
TCH095_02
/
tch095_02.swf
/
scripts
/
frame_6
/
DoAction.as
Wrap
Text File
|
2007-06-28
|
1KB
|
77 lines
function joueSon(my_MC, lListeSons, lNomSon, lFaitAvancer)
{
trace(lNomSon);
lPosSon = getPos(lListeSons,lNomSon);
my_MC.gSonJoue = lPosSon;
my_MC.my_music.setVolume(30);
if(my_MC["my_comment_" + lPosSon] != undefined)
{
my_MC["my_comment_" + lPosSon].start();
if(lFaitAvancer === 1)
{
my_MC.gotoAndPlay(my_MC._currentframe + 1);
}
}
}
function stopSon(my_MC, lNomSon, lFaitAvancer)
{
my_MC[lNomSon].stop();
if(my_MC.gMusicOn === 1)
{
my_MC.my_music.setVolume(70);
}
if(lFaitAvancer === 1)
{
my_MC.gotoAndPlay(my_MC._currentframe + 1);
}
}
function gimme2digits(X)
{
if(X < 10)
{
lX = "0" + String(X);
}
else
{
lX = String(X);
}
return lX;
}
function getPos(lList, lValue)
{
lPresent = -1;
i = 0;
while(i <= lList.length)
{
if(lList[i] == lValue)
{
lPresent = i;
}
i++;
}
return lPresent;
}
function trouvePosMax(lList)
{
lMax = lList[0];
lPosMax = 0;
i = 1;
while(i <= lList.length)
{
if(lList[i] > lMax)
{
lMax = lList[i];
lPosMax = i;
}
i++;
}
return lPosMax;
}
function randRange(min, max)
{
var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min;
return _loc1_;
}
gListeSons = gListST;
gSonJoue = 0;